package org.unt.menu;

import org.unt.bean.Bean;

public class Link extends Bean {

	private String name;
	private String url;
	private int level;
	private boolean marked;

	public Link(String name, String url, int level, boolean marked) {
		super();
		this.name = name;
		this.url = url;
		this.level = level;
		this.marked = marked;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public boolean isMarked() {
		return marked;
	}

	public void setMarked(boolean marked) {
		this.marked = marked;
	}

	public String toStringForTest() {

		String identation = "                    ".substring(0, 2 * Math.min(level, 10));
		return identation + name + (marked ? " *" : "");
	}
}
